import request from '@/utils/request'

export function getCategoryList() {
  return request({
    url: '/api/web/category/list',
    method: 'get'
  })
}

export function getCategoryById(id) {
  return request({
    url: `/api/web/category/detail/${id}`,
    method: 'get'
  })
}

export function getArticlesByCategory(id, params) {
  return request({
    url: `/api/web/category/${id}/articles`,
    method: 'get',
    params
  })
}